﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace eTMS.Controls
{
    public class ComboBoxPhut : ComboBoxBindingBase<int>
    {
        public override void BindData()
        {
            DataTable tbl = new DataTable();
            tbl.Columns.Add("Phut_ID", typeof(int));
            tbl.Columns.Add("Ten", typeof(string));
            int Max = 59;
            for (int i = 0; i <= Max; i++)
            {
                DataRow r = tbl.NewRow();
                r["Phut_ID"] = i;
                r["Ten"] = Commons.Common.FixLength(i.ToString(), 2);
                tbl.Rows.Add(r);
            }
            this.DataSource = tbl;
            this.ValueMember = "Phut_ID";
            this.DisplayMember = "Ten";
            this.SelectedValue = DateTime.Now.Minute;
        }
    }
}
